//普通的纯函数
// function cheakAge (min, age) {
//     return age >= min
// }
// console.log(cheakAge(18, 30))
// console.log(cheakAge(18, 24))
// console.log(cheakAge(22, 30))
//函数的柯里化
function cheakAge (min) {
    return function(age){
        return age >= min
    }
}
let cheakAge18 = cheakAge(18)
let cheakAge20 = cheakAge(20)
console.log(cheakAge18(20))
console.log(cheakAge20(22))